<?php
namespace Api\Behavior;
class ApiLogBehavior {
     // 行为扩展的执行入口必须是run
     public function run(&$params){
     	$data['appID']=I("post.appID");
     	$data['ip']=get_client_ip();
        $data['action']=MODULE_NAME."/".CONTROLLER_NAME."/".ACTION_NAME;
        $data['addTime']=time();
        $data['isTrue']=$params['status'];
        $data['errorCode']=$params['errorCode'];
		if(ACTION_NAME!="acceptData"){
			$add=M("app_api_log")->data($data)->add();
		}
     }
}


